package com.hzy.quetosys.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data

public class Customer {
    private int id;
    @NotBlank(message = "客户名称不能为空")
    @Size(max=50,message = "客户名称不能超过50字")
    private String name;
    @NotBlank(message = "客户电话不能为空")
    @Pattern(
            regexp = "^[0][1-9]{1}[0,9]{1,2}-[1-9]{1}[0-9]{6,7}$",
            message = "客户电话必须符合格式要求，如：010-88889999")
    private String tel;
    @NotBlank(message = "客户地址不能为空")
    @Size(max=100,message = "客户地址不能超过100字")
    private String address;
    @NotBlank(message = "联系人不能为空")
    @Size(max=50,message = "联系人不能超过50字")
    private String relName;
    private String other;
}
